<?php
namespace app\index\controller;
use think\Controller;
class Base extends Controller
{
  public function _initialize(){
    $this->conf();
    $this->count();
  }

  public function count(){
    $counts = db('count')->select();
    foreach($counts as $k => $v){
      $count[$v['enname']] = $v;
    }
    $this->assign('count',$count);
    // dump($count); die;
  }
  public function conf(){
    $confs = db('conf')->select();
    foreach($confs as $k => $v){
      $conf[$v['enname']] = $v['value'];
    }
    $this->assign('conf',$conf);
  }

  // 空操作
  public function _empty(){
    $this->redirect('index/index');
  }

}

?>